<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <form onsubmit="doSubmit()">
        <label for="user">姓名：</label>
        <input type="text" id="user" placeholder="请输入姓名...">
        <br><br>
        <label for="pass">密码：</label>
        <input type="password" id="pass" placeholder="请输入密码...">
        <br><br>
        <label for="bdate">出生日期：</label>
        <input type="date" id="bdate">
        <br><br>
        <label for="sex">性别：</label>
        <select id="sex">
            <option value="boy">男</option>
            <option value="girl">女</option>
        </select>
        <br><br>
        <input type="reset" value="重置">
        <input type="submit" value="提交">
    </form>
    
    <script>
    function doSubmit() {
        let x = "";
        x += " 姓名:" + document.getElementById("user").value;
        x += " 密码:" + document.getElementById("pass").value;
        x += " 生日:" + document.getElementById("bdate").value;
        x += " 性别:" + document.getElementById("sex").value;
        alert(x);
    }
    </script>
</body>
</html>